<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>

<c:if test="${not empty page.result}">
    <table class="table table-striped table-hover" id="message-table">
        <thead>
        <tr>
            <th width="28%">用户名</th>
            <th>人员名称</th>
            <th>创建时间</th>
            <th>所属角色</th>
            <th>操作</th>
        </tr>
        </thead>

        <tbody>
        <c:forEach var="var" items="${page.result}">
            <tr>
                <td>${var.userName}</td>
                <td>${var.trueName}</td>
                <td><fmt:formatDate value="${var.cjsj}" type="date" pattern="yyyy-MM-dd HH:mm"/></td>
                <td>
                    <c:if test="${var.roleId eq '2'}">教务管理员</c:if>
                    <c:if test="${var.roleId eq '3'}">普通教师</c:if>
                </td>

                <td>
                    <div class="btn-group">
                        <a class="btn btn-sm btn-default" href="${ctx}/sys/user/show.do?id=${var.userId}"
                           data-toggle="modal" data-target="#modal">查看资料
                        </a>
                        <a href="#" type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" style="color: #000; padding-top: 12px;padding-bottom: 12px;">
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="${ctx}/sys/user/edit.do?id=${var.userId}" data-toggle="modal" data-target="#modal"><span class="glyphicon glyphicon-edit prs"></span>&nbsp;编辑资料</a></li>
                            <li><a href="${ctx}/sys/user/editPwd.do?id=${var.userId}" data-toggle="modal" data-target="#modal"><i class="glyphicon glyphicon-pencil"></i>&nbsp;修改密码</a></li>
                            <li><a href="javascript:deleteUser('${var.userId}');" ><span class="glyphicon glyphicon-trash prs"></span>&nbsp;删除</a></li>
                        </ul>
                    </div>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</c:if>
<c:if test="${empty page.result}">
    <ul class="media-list conversation-list">
        <li class="empty">暂无相关信息</li>
    </ul>
</c:if>

<!-- 分页begin -->
<jsp:include page="../../common/pager.jsp"></jsp:include>
<!-- 分页end -->
